//
//  GAKKIBaseButton.h
//  GANGAIKit
//
//  Created by fh on 2019/11/6.
//  Copyright © 2019 cashchina. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "GAKKIConfig.h"
@class GAKKIBaseButton;

NS_ASSUME_NONNULL_BEGIN

typedef GAKKIBaseButton * _Nonnull (^GAKKIButtonFrame) (CGRect frame);
typedef GAKKIBaseButton * _Nonnull (^GAKKIButtonBackgroundColor) (UIColor * __nullable backgroundColor);
typedef GAKKIBaseButton * _Nonnull (^GAKKIButtonTitle) (NSString * __nullable title, UIControlState state);
typedef GAKKIBaseButton * _Nonnull (^GAKKIButtonTitleColor) (UIColor * __nullable color, UIControlState state);
typedef GAKKIBaseButton * _Nonnull (^GAKKIButtonFont) (UIFont * __nullable font);
typedef GAKKIBaseButton * _Nonnull (^GAKKIButtonImage) (UIImage * __nullable image, UIControlState state);
typedef GAKKIBaseButton * _Nonnull (^GAKKIButtonBackgroundImage) (UIImage * __nullable image, UIControlState state);
typedef GAKKIBaseButton * _Nonnull (^GAKKIButtonTitleEdgeInsets) (UIEdgeInsets titleEdgeInsets);
typedef GAKKIBaseButton * _Nonnull (^GAKKIButtonImageEdgeInsets) (UIEdgeInsets imageEdgeInsets);

typedef GAKKIBaseButton * _Nonnull (^GAKKIButtonCornerRadius) (CGFloat cornerRadius);
typedef GAKKIBaseButton * _Nonnull (^GAKKIButtonBorderWidth) (CGFloat borderWidth);
typedef GAKKIBaseButton * _Nonnull (^GAKKIButtonBorderColor) (UIColor *borderColor);
typedef GAKKIBaseButton * _Nonnull (^GAKKIButtonClipsToBounds) (BOOL clipsToBounds);

/// 按钮基类
@interface GAKKIBaseButton : UIButton

/// 初始化统一样式
+ (instancetype)initGAKKIBaseButton;

/// 工厂类方法
/// @param block 实例对象
+ (GAKKIBaseButton *)gakki_makeButton:(void(^)(GAKKIBaseButton * button))block;

/// 工厂类方法
/// @param block 实例对象
/// @param actionCallBack 点击事件回调
+ (GAKKIBaseButton *)gakki_makeButton:(void(^)(GAKKIBaseButton * button))block actionCallBack:(void(^ __nullable)(GAKKIBaseButton *button))actionCallBack;

/// 尺寸
@property (nonatomic, readonly, copy) GAKKIButtonFrame gakki_frame;
/// 背景颜色
@property (nonatomic, readonly, copy) GAKKIButtonBackgroundColor gakki_backgroundColor;
/// 标题
@property (nonatomic, readonly, copy) GAKKIButtonTitle gakki_title;
/// 标题颜色
@property (nonatomic, readonly, copy) GAKKIButtonTitleColor gakki_titleColor;
/// 字体
@property (nonatomic, readonly, copy) GAKKIButtonFont gakki_font;
/// 图片
@property (nonatomic, readonly, copy) GAKKIButtonImage gakki_image;
/// 背景图片
@property (nonatomic, readonly, copy) GAKKIButtonBackgroundImage gakki_backgroundImage;
/// 标题边距
@property (nonatomic, readonly, copy) GAKKIButtonTitleEdgeInsets gakki_titleEdgeInsets;
/// 图片边距
@property (nonatomic, readonly, copy) GAKKIButtonImageEdgeInsets gakki_imageEdgeInsets;

/// 弧度
@property (nonatomic, readonly, copy) GAKKIButtonCornerRadius gakki_cornerRadius;
/// 边框粗
@property (nonatomic, readonly, copy) GAKKIButtonBorderWidth gakki_borderWidth;
/// 边框颜色
@property (nonatomic, readonly, copy) GAKKIButtonBorderColor gakki_borderColor;
/// 是否剪裁
@property (nonatomic, readonly, copy) GAKKIButtonClipsToBounds gakki_clipsToBounds;

@end

NS_ASSUME_NONNULL_END
